#!/usr/bin/fish
# #!/bin/sh
#this is just an early test, not even proof of concept yet, nothing variablised yet, just testing this one...

#devnotes reminder
# [2020-08- 7 02:56:54] <Digitteknohippie> made a little more progress on my font preview generator script.  got up to a better cascade of errors after a few versions.  :)  nothing useful to report.  just marking this landmark in my progress thus far, while i stop for another break.  
#[2020-08- 7 02:57:52] <Digitteknohippie> reminder to self:  the imagemagick's file name still using "$usefonty", but the initiating "for" uses "(digitsfonts)".  mend that.
#[2020-08- 7 02:58:31] <Digitteknohippie> :)   ok, now i rest again.  :)

#fontcat's being made to use the bedrock logo for now.  eventually will be able to be used with any string.
#what to call the string:
set textstringn=bedrock
#what the text string actually is:
set textstringy="
__          __             __
\ \_________\ \____________\ \___
 \  _ \  _\ _  \  _\ __ \ __\   /
  \___/\__/\__/ \_\ \___/\__/\_\_\
                      Bedrock Linux
"

#usefonty for not just being a 1-piece variable, will become all(*)'able and specifyiable from cl.
#this'll need some thought beyond just making this a list.  will need some whilings or for'ings

# will be commenting out this janky save point's stuff in favor of "digitsfonts" (at time of writing, "wheremybitchesat").
set fontydir="~/.fonts"
set usefonty=(ls (fontydir) | egrep 'ttf|otb')
#this is the janky point at which i decided i should save/add/commit/push before i jank it up worse noisey mess n lose the basics.
#usefonty=nztt 

#     must stop workin on this while super super sleepy.

#devnotes:  idk here... the $i, the "$i", how to get that to ...
function themagic
#here's the imagemagick magic:
convert \
    -size 420x90 \
    xc:black \
    -font "$i" \
    -pointsize 5 \
    -fill white \
    -draw "text 0,0 '
__          __             __
\ \_________\ \____________\ \___
 \  _ \  _\ _  \  _\ __ \ __\   /
  \___/\__/\__/ \_\ \___/\__/\_\_\ 
                      Bedrock Linux
'" \
#    fontcat-(echo $textstringn)-(echo $usefonty)-(echo (date +%F_%H%M%S)).png
    fontcat-(echo $textstringn)-(echo $i)-(echo (date +%F_%H%M%S)).png

#the pseudocode development refines closer n closer to real code
#the simple test develops closer to the complete featureset.
#    fontcat-(echo $textstringn)-(echo $usefonty)-(echo (date +%F_%R%M%S)).png
#    fontcat-bedrock-nztt(echo date +%F_%T).png
#    fontcat-bedrock-nztt.png
end

#and it all starts here:
#ehrmagerd wat pseudocode madness is this?  n_n
#for i in $fontylist; do themagic; end
#or... see digitsfonts, for how that list'd generated
##### OH!  and, OOPS... "digitsfonts" adds non-font lines!  dont use as is!
for i in (digitsfonts); themagic; end

#yeah, scriblin further... something maybe more like:
#for i in (digitsfonts) ; (fontcat) -f $i $i ;end
#except really working n knowing wtf i'm doing.  like... that -f...?  is that for files?   do i need specify for lines?  "man for" doesnt offer a lot.
